package com.boarsoft.boar.batch.quartz;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.boarsoft.boar.batch.BatchContext;
import com.boarsoft.boar.batch.service.BatchInspector;

/**
 * 用于定时调起流程的Quartz Job子类<br/>
 * 
 */
public class BatchExecutionQuartzJob implements Job {
	private static final Logger log = LoggerFactory.getLogger(BatchExecutionQuartzJob.class);

	/**
	 * 调起指定的流程
	 */
	@Override
	public final void execute(JobExecutionContext jec) throws JobExecutionException {
		log.debug("Batch execution quartz job execute");
		BatchInspector inspector = BatchContext.getInspector();
		inspector.resume();
		inspector.timeout();
	}
}
